CREATE TABLE `SRAnalytics`.`MsgLiveSurfaceFixedTerm` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`surfaceType` ENUM('None','Live','PrevDay','Interp','Close','Test') NOT NULL DEFAULT 'None',
`synSpot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Synthetic spot price (market-derived spot when the underlying is not a traded instrument)',
`hEMove` FLOAT NOT NULL DEFAULT 0 COMMENT 'expected forward earnings move (average of the last 8-12 underlier earnings moves; w/max clipping)',
`hEMoveNum` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'num historical earnings moves in historical window',
`hEMoveAvg` FLOAT NOT NULL DEFAULT 0 COMMENT 'avg historical earnings move (last 8-12 underlier earnings moves)',
`hEMoveStd` FLOAT NOT NULL DEFAULT 0 COMMENT 'std historical earnings move (last 8-12 underlier earnings moves)',
`hEMoveMin` FLOAT NOT NULL DEFAULT 0 COMMENT 'max historical earnings move (last 8-12 underlier earnings moves)',
`hEMoveMax` FLOAT NOT NULL DEFAULT 0 COMMENT 'min historical earnings move (last 8-12 underlier earnings moves)',
`iEMove` FLOAT NOT NULL DEFAULT 0 COMMENT 'implied earnings move (implied move; all earnings events)',
`iEFitCode` ENUM('None','Minimum','CenterError','LeftError','RightError','SplitError','DecentError','LeftBound','RightBound','MaxSteps','CenterFlat') NOT NULL DEFAULT 'None' COMMENT 'implied EFit Code',
`iEFitError` FLOAT NOT NULL DEFAULT 0 COMMENT 'eMove fit error (term surface fit error)',
`expiryCount` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of actual expirations involved',
`iEMoveAvg` FLOAT NOT NULL DEFAULT 0 COMMENT 'average eMove today',
`iEMoveStd` FLOAT NOT NULL DEFAULT 0 COMMENT 'eMove std dev today',
`iEMoveMin` FLOAT NOT NULL DEFAULT 0 COMMENT 'eMove min today',
`iEMoveMax` FLOAT NOT NULL DEFAULT 0 COMMENT 'emove max today',
`iEMoveCnt` INT NOT NULL DEFAULT 0 COMMENT 'number of surface term fits today',
`eMoveExpAdj1` INT NOT NULL DEFAULT 0 COMMENT 'number of expirations (+/-) that the next earn date was moved to best fit market term structure (if any)',
`eMoveYrsAdj1` FLOAT NOT NULL DEFAULT 0 COMMENT 'number of trading years (+/-) that the next earn date was moved to best fit market term structure (if any)',
`eMoveYears1` FLOAT NOT NULL DEFAULT 0 COMMENT 'years to expiration from LiveSurfaceCurve.pkey.ekey = eMoveFKey1',
`eMoveEKey1_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 1st implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj1 != 0)',
`eMoveEKey1_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 1st implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj1 != 0)',
`eMoveEKey1_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 1st implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj1 != 0)',
`eMoveEKey1_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 1st implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj1 != 0)',
`eMoveEKey1_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 1st implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj1 != 0)',
`eMoveEKey1_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 1st implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj1 != 0)',
`eMoveExpAdj2` INT NOT NULL DEFAULT 0 COMMENT 'number of expirations (+/-) that the 2nd earn date was moved to best fit market term structure (if any)',
`eMoveYrsAdj2` FLOAT NOT NULL DEFAULT 0 COMMENT 'number of trading years (+/-) that the 2nd earn date was moved to best fit market term structure (if any)',
`eMoveYears2` FLOAT NOT NULL DEFAULT 0 COMMENT 'years to expiration from LiveSurfaceCurve.pkey.fkey = eMoveFKey2',
`eMoveEKey2_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 2nd implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj2 != 0)',
`eMoveEKey2_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 2nd implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj2 != 0)',
`eMoveEKey2_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 2nd implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj2 != 0)',
`eMoveEKey2_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 2nd implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj2 != 0)',
`eMoveEKey2_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 2nd implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj2 != 0)',
`eMoveEKey2_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'LiveSurfaceCurve.pkey.ekey immediately after 2nd implied earnings move (note: this will not match the base earnings calendar if eMoveDtAdj2 != 0)',
`atmCenI_st` FLOAT NOT NULL DEFAULT 0 COMMENT 'short term (5 day) model atm volatility (censored using iEMult)',
`atmCenI_lt` FLOAT NOT NULL DEFAULT 0 COMMENT 'long term (504 day) model atm volatility',
`atmCenI_decay` FLOAT NOT NULL DEFAULT 0 COMMENT 'model decay parameter',
`atmCenI_5d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 5 day atm vol (censored using iEMult)',
`atmCenI_10d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 10 day atm vol',
`atmCenI_21d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 21 day atm vol',
`atmCenI_42d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 42 day atm vol',
`atmCenI_63d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 63 day atm vol',
`atmCenI_84d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 84 day atm vol',
`atmCenI_105d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 105 day atm vol',
`atmCenI_126d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 126 day atm vol',
`atmCenI_189d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 189 day atm vol',
`atmCenI_252d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 252 day atm vol',
`atmCenI_378d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 378 day atm vol',
`atmCenI_504d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 504 day atm vol',
`atmCenH_st` FLOAT NOT NULL DEFAULT 0 COMMENT 'short term (5 day) model atm volatility (censored using hEMult)',
`atmCenH_lt` FLOAT NOT NULL DEFAULT 0 COMMENT 'long term (504 day) model atm volatility',
`atmCenH_decay` FLOAT NOT NULL DEFAULT 0 COMMENT 'model decay parameter',
`atmCenH_5d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 5 day atm vol (censored using hEMult)',
`atmCenH_10d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 10 day atm vol',
`atmCenH_21d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 21 day atm vol',
`atmCenH_42d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 42 day atm vol',
`atmCenH_63d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 63 day atm vol',
`atmCenH_84d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 84 day atm vol',
`atmCenH_105d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 105 day atm vol',
`atmCenH_126d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 126 day atm vol',
`atmCenH_189d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 189 day atm vol',
`atmCenH_252d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 252 day atm vol',
`atmCenH_378d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 378 day atm vol',
`atmCenH_504d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 504 day atm vol',
`sDiv_5d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 5 day implied sdiv rate',
`sDiv_10d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 10 day implied sdiv rate',
`sDiv_21d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 21 day implied sdiv rate',
`sDiv_42d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 42 day implied sdiv rate',
`sDiv_63d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 63 day implied sdiv rate',
`sDiv_84d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 84 day implied sdiv rate',
`sDiv_105d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 105 day implied sdiv rate',
`sDiv_126d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 126 day implied sdiv rate',
`sDiv_189d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 189 day implied sdiv rate',
`sDiv_252d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 252 day implied sdiv rate',
`sDiv_378d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 378 day implied sdiv rate',
`sDiv_504d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 504 day implied sdiv rate',
`fwdUPrc_5d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 5 day implied forward price',
`fwdUPrc_10d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 10 day implied forward price',
`fwdUPrc_21d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 21 day implied forward price',
`fwdUPrc_42d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 42 day implied forward price',
`fwdUPrc_63d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 63 day implied forward price',
`fwdUPrc_84d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 84 day implied forward price',
`fwdUPrc_105d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 105 day implied forward price',
`fwdUPrc_126d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 126 day implied forward price',
`fwdUPrc_189d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 189 day implied forward price',
`fwdUPrc_252d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 252 day implied forward price',
`fwdUPrc_378d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 378 day implied forward price',
`fwdUPrc_504d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 504 day implied forward price',
`vWidth_5d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 5 day market vwidth',
`vWidth_10d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 10 day market vwidth',
`vWidth_21d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 21 day market vwidth',
`vWidth_42d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 42 day market vwidth',
`vWidth_63d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 63 day market vwidth',
`vWidth_84d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 84 day market vwidth',
`vWidth_105d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 105 day market vwidth',
`vWidth_126d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 126 day market vwidth',
`vWidth_189d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 189 day market vwidth',
`vWidth_252d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 252 day market vwidth',
`vWidth_378d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 378 day market vwidth',
`vWidth_504d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 504 day market vwidth',
`vSlope_5d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 5 day atm vol slope',
`vSlope_10d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 10 day atm vol slope',
`vSlope_21d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 21 day atm vol slope',
`vSlope_42d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 42 day atm vol slope',
`vSlope_63d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 63 day atm vol slope',
`vSlope_84d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 84 day atm vol slope',
`vSlope_105d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 105 day atm vol slope',
`vSlope_126d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 126 day atm vol slope',
`vSlope_189d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 189 day atm vol slope',
`vSlope_252d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 252 day atm vol slope',
`vSlope_378d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 378 day atm vol slope',
`vSlope_504d` FLOAT NOT NULL DEFAULT 0 COMMENT 'Interpolated 504 day atm vol slope',
`eCnt_5d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_10d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_21d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_42d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_63d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_84d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_105d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_126d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_189d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_252d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_378d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`eCnt_504d` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of expected earnings events',
`status` ENUM('None','Normal','Closed') NOT NULL DEFAULT 'None',
`time` TIME(6) NOT NULL DEFAULT '00:00:00.000000',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'update timestamp',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`surfaceType`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='LiveSurfaceFixedTerm (surfaceType = \'Live\') records contain a live implied volatility term record at standardized days-to-expiration. SurfaceType = \'PriorDay\' records contain the final record from the prior trading day.\nThese records include implied and histrical earnings moves, implied earnings date adjustments, and interpolated/gridded atm, sdiv, and quote width values.\nLiveSurfaceTerm records are published to the SpiderRock elastic cluster every 10 minutes for all equity and index underliers with options.';